<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/part2admin/common/adminInit.jsp"%>


<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #F8F9FA;
}
-->
</style>
<link href="part2admin/images/skin.css" rel="stylesheet" type="text/css" />
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="17" height="29" valign="top"
			background="images/mail_leftbg.gif"><img
			src="part2admin/images/left-top-right.gif" width="17" height="29" /></td>
		<td width="935" height="29" valign="top"
			background="part2admin/images/content-bg.gif">
		<table width="100%" height="29" border="0" cellpadding="0"
			cellspacing="0" class="left_topbg" id="table2">
			<tr>
				<td height="29" valign="top" align="left">
				<div class="titlebt">信息列表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<select id="newsType" onChange="ajaxList()">
					<option value="">--请选择--</option>
					<option value="0">新闻消息</option>
					<option value="1">职员风采</option>
					<option value="2">培训专栏</option>
					<option value="3">服务与支持</option>
				</select></div>
				</td>
				<td align="right"><a href="javascript:;" onClick="add()"
					title="add news"> <img src="part2admin/images/add.gif"
					border="0" alt="添加信息" title="添加信息" /></a></td>
			</tr>
		</table>
		</td>
		<td width="16" valign="top"
			background="part2admin/images/mail_rightbg.gif"><img
			src="part2admin/images/nav-right-bg.gif" width="16" height="29" /></td>
	</tr>
	<tr>
		<td height="71" valign="middle"
			background="part2admin/images/mail_leftbg.gif">&nbsp;</td>
		<td valign="top" bgcolor="#F7F8F9">

		<table width="100%" height="138" border="0" cellpadding="0"
			cellspacing="0">

			<tr>
				<td valign="top"><aa:zone name="newsList">
					<table width="98%" border="0" align="center" cellpadding="0"
						cellspacing="0">
						<tr>
							<td class="left_txt">当前位置：信息列表&nbsp;&nbsp <logic:present
								name="type">::::
			<font style="color: red"><strong> <logic:equal
									name="type" value="0">新闻列表</logic:equal> <logic:equal
									name="type" value="1">职员风采</logic:equal> <logic:equal
									name="type" value="2">培训专栏</logic:equal> <logic:equal
									name="type" value="3">服务与支持</logic:equal> </strong></font>
							</logic:present> <logic:present name="key">::::&nbsp;&nbsp查询关键字为&nbsp;&nbsp
            <font style="color: red"><strong> <bean:write
									name="key" /> </strong></font>
							</logic:present></td>
							<td class="left_txt" align="right">
							<form name="newsSearchForm" id="Search" onSubmit="searchAjax()"
								method="post"><img src="part2admin/images/pic7.gif">
							<input type="text" name="voa.value(Search).field(key)" id="key" />
							</form>

							</td>
						</tr>
						<tr>
							<td height="20" colspan="2">

							<table width="100%" height="1" border="0" cellpadding="0"
								cellspacing="0" bgcolor="#CCCCCC">
								<tr>
									<td></td>
								</tr>
							</table>
							</td>
						</tr>
						<tr>
							<td colspan="2"></td>
						</tr>
						<tr>
							<td colspan="2"></td>
						</tr>
						<tr>
							<td colspan="2">

							<table width="80%" height="31" border="1" align="center"
								cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
								<tr align="center" class="nowtable">
									<td class="left_bt2" width="5%">序号</td>
									<td class="left_bt2" width="20%">标题(中)</td>
									<td class="left_bt2" width="20%">标题(英)</td>
									<td class="left_bt2" width="10%">类型</td>
									<td class="left_bt2" width="15%">创建日期</td>
									<td class="left_bt2" width="15%">更新日期</td>
									<td class="left_bt2" width="10%">操作</td>
								</tr>
								<logic:present name="page">
									<logic:iterate id="list" name="page" property="result"
										scope="request" indexId="indexid">
										<tr align="center">
											<td class="left_txt">${indexid+1}</td>
											<td class="left_txt"><bean:define id="newsTitle"
												name="list" property="newsTitle" /> <%=Part2Util.subStringText(newsTitle, 9)%>...
											</td>
											<td class="left_txt"><logic:empty name="list"
												property="newsTitleEn">暂无</logic:empty> <logic:notEmpty
												name="list" property="newsTitleEn">
												<bean:define id="newsTitleEn" name="list"
													property="newsTitleEn" />
												<%=Part2Util.subStringText(newsTitleEn, 9)%>...
				</logic:notEmpty></td>
											<td class="left_txt"><logic:equal name="list"
												property="newsType" value="0">新闻消息</logic:equal> <logic:equal
												name="list" property="newsType" value="1">职员风采</logic:equal>
											<logic:equal name="list" property="newsType" value="2">培训专栏</logic:equal>
											<logic:equal name="list" property="newsType" value="3">服务与支持</logic:equal>
											</td>
											<td class="left_txt"><bean:write format="yyyy-MM-dd"
												name="list" property="createDate" /></td>
											<td class="left_txt"><bean:write format="yyyy-MM-dd"
												name="list" property="lastModifielDate" /></td>
											<td class="left_txt"><a href="javascript:;"
												onClick="edit('${list.newsId}')" title="编辑"> <img
												src="part2admin/images/edit.gif" border="0" alt="编辑"
												title="编辑" /></a>&nbsp;&nbsp;&nbsp; <a
												href="newsAction.do?method=delete&newsId=${list.newsId}"
												onClick="return confirm('确定删除${list.newsTitle}信息?')"><img
												src="part2admin/images/delete.gif" border="0" alt="删除"
												title="删除" /></a></td>
										</tr>
									</logic:iterate>
								</logic:present>
							</table>
							</td>
						</tr>
						<tr>

							<td colspan="2" align="center" class="left_txt"><logic:present
								name="page">
								<%
									String pagePath = "";
								%>
								<logic:present name="key">
									<%
										pagePath = "newsAction.do?method=search&key="
															+ request.getAttribute("key");
									%>
								</logic:present>
								<logic:notPresent name="key">
									<%
										pagePath = "newsAction.do?method=list&newsType="
															+ request.getAttribute("type");
									%>
								</logic:notPresent>
								<pager:pager action="<%=pagePath%>" />
							</logic:present> <logic:notEmpty name="res">

								<bean:write name="res" />
							</logic:notEmpty></td>
						</tr>
					</table>
				</aa:zone></td>
			</tr>

		</table>

		</td>
		<td background="part2admin/images/mail_rightbg.gif">&nbsp;</td>
	</tr>
	<tr>
		<td valign="middle" background="part2admin/images/mail_leftbg.gif"><img
			src="part2admin/images/buttom_left2.gif" width="17" height="17" /></td>
		<td height="17" valign="top"
			background="part2admin/images/buttom_bgs.gif"><img
			src="part2admin/images/buttom_bgs.gif" width="17" height="17" /></td>
		<td background="part2admin/images/mail_rightbg.gif"><img
			src="part2admin/images/buttom_right2.gif" width="16" height="17" /></td>
	</tr>
</table>

<script type="text/javascript"> 
			//<![CDATA[
				$.setupJMPopups({
					screenLockerBackground: "#003366",
					screenLockerOpacity: "0.7"
				});
 
				function add() {
					$.openPopupLayer({
						name: "addNews",
						width: 600,
						url: "newsAction.do?method=preAdd"
					});
				}
				
				function edit(id) {
					$.openPopupLayer({
						name: "editNews",
						width: 600,
						url: "newsAction.do?method=preEdit&id="+id
					});
				}
			//]]>
		</script>

<script>
		function ajaxList()
		{			
			var type=document.getElementById("newsType").value;			
			ajaxAnywhere.getAJAX('newsAction.do?method=list&newsType='+type, 'newsList');	
		}
		function searchAjax()
		{
			var f=document.getElementById("Search");			  
			f.action="newsAction.do?method=search";
			ajaxAnywhere.submitAJAX();	
		}
</script>
</body>
